package com.sheep.classroompie.util;

public class GenerateCourseId {
  //生成加课码
  public static String generateCourseId(){
    char[] codes = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U',
                    'V','W','X','Y','Z','1','2','3','4','5','6','7','8','9'};
    String courseId = "";
    for(int i=0;i < 6;i++){
      int n = (int) (Math.random()*35);
      courseId += codes[n];
    }
    System.out.println(courseId);
    return courseId;
  }
}
